<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="../common/common.jsp"%>
<script type="text/javascript">
	var basepath=<%=request.getContextPath()+"/"%>;
	$(function(){
		var height = window.document.body.offsetHeight-50;
		$("#staff_cultivate_table").datagrid({
			height:height,
			fitColumns:true,
			//fit:true,
			pagination:true,//分页数据
			rownumbers: true,
			loadMsg:'正在加载数据,请稍后',
			pageSize:10,
			url : basepath+'contractInfoAction!loadMainContractInfo.do',
			columns:[[  
			          {field:'a',title:'员工姓名',width:100},  
			          {field:'b',title:'所属部门',width:100}
		    ]],
		    toolbar : [{
		    	text : '申请信息管理',
		    	iconCls : 'icon-add',
		    	handler : function(){
		    		$('#staff_info_win').window('open');
		    		$('#staff_info_win').window('setTitle','申请表人员信息');
		    	}
		    },{
		    	text : '查看',
		    	iconCls : 'icon-ok',
		    	handler : function(){
		    		
		    	}
		    }]
		});		
		$("#promote_info_table").datagrid({
			height:height-30,
			fitColumns:true,
			//fit:true,
			pagination:true,//分页数据
			rownumbers: true,
			loadMsg:'正在加载数据,请稍后',
			pageSize:10,
			url : basepath+'contractInfoAction!loadMainContractInfo.do',
			columns:[[  
			          {field:'a',title:'员工姓名',width:100},  
			          {field:'b',title:'所属部门',width:100},  
			          {field:'c',title:'申请日期',width:100},  
			          {field:'d',title:'原职称',width:100},  
			          {field:'e',title:'新职称',width:100}
		    ]],
		    toolbar : [{
		    	text : '新增',
		    	iconCls : 'icon-add',
		    	handler : function(){
		    		$('#promote_info_win').window('open');
		    		$('#promote_info_win').window('setTitle','申请表人员信息');
		    	}
		    },{
		    	text : '编辑',
		    	iconCls : 'icon-edit',
		    	handler : function(){
		    		$('#promote_info_win').window('open');
		    		$('#promote_info_win').window('setTitle','申请表人员信息');
		    	}
		    },{
		    	text : '删除',
		    	iconCls : 'icon-no',
		    	handler : function(){
		    		 $.messager.confirm('信息提示','你是否要删除当前选中数据?',function(r){  
		   				  if(r){
		   					  $.messager.alert('信息提示','删除成功');
		   				  }
		   			 });
		    	}
		    },{
		    	text : '查看',
		    	iconCls : 'icon-ok',
		    	handler : function(){
		    		
		    	}
		    }]
		});
		$("#positive_info_table").datagrid({
			height:height-30,
			fitColumns:true,
			//fit:true,
			pagination:true,//分页数据
			rownumbers: true,
			loadMsg:'正在加载数据,请稍后',
			pageSize:10,
			url : basepath+'contractInfoAction!loadMainContractInfo.do',
			columns:[[  
			          {field:'a',title:'员工姓名',width:100},  
			          {field:'b',title:'所在岗位',width:100},  
			          {field:'c',title:'申请转正时间',width:100},  
			          {field:'d',title:'建议转正日期',width:100}
		    ]],
		    toolbar : [{
		    	text : '新增',
		    	iconCls : 'icon-add',
		    	handler : function(){
		    		$('#positive_info_win').window('open');
		    		$('#positive_info_win').window('setTitle','申请表人员信息');
		    	}
		    },{
		    	text : '编辑',
		    	iconCls : 'icon-edit',
		    	handler : function(){
		    		$('#positive_info_win').window('open');
		    		$('#positive_info_win').window('setTitle','申请表人员信息');
		    	}
		    },{
		    	text : '删除',
		    	iconCls : 'icon-no',
		    	handler : function(){
		    		 $.messager.confirm('信息提示','你是否要删除当前选中数据?',function(r){  
		   				  if(r){
		   					  $.messager.alert('信息提示','删除成功');
		   				  }
		   			 });
		    	}
		    },{
		    	text : '查看',
		    	iconCls : 'icon-ok',
		    	handler : function(){
		    		
		    	}
		    }]
		});
		$("#resign_info_table").datagrid({
			height:height-30,
			fitColumns:true,
			//fit:true,
			pagination:true,//分页数据
			rownumbers: true,
			loadMsg:'正在加载数据,请稍后',
			pageSize:10,
			url : basepath+'contractInfoAction!loadMainContractInfo.do',
			columns:[[  
			          {field:'a',title:'员工姓名',width:100},  
			          {field:'b',title:'所属部门',width:100},  
			          {field:'c',title:'所在岗位',width:100}
		    ]],
		    toolbar : [{
		    	text : '新增',
		    	iconCls : 'icon-add',
		    	handler : function(){
		    		$('#resign_info_win').window('open');
		    		$('#resign_info_win').window('setTitle','申请表人员信息');
		    	}
		    },{
		    	text : '编辑',
		    	iconCls : 'icon-edit',
		    	handler : function(){
		    		$('#resign_info_win').window('open');
		    		$('#resign_info_win').window('setTitle','申请表人员信息');
		    	}
		    },{
		    	text : '删除',
		    	iconCls : 'icon-no',
		    	handler : function(){
		    		 $.messager.confirm('信息提示','你是否要删除当前选中数据?',function(r){  
		   				  if(r){
		   					  $.messager.alert('信息提示','删除成功');
		   				  }
		   			 });
		    	}
		    },{
		    	text : '查看',
		    	iconCls : 'icon-ok',
		    	handler : function(){
		    		
		    	}
		    }]
		});
	});
	function applyAdd(){
		$("#apply_info_win").window('open');
		$("#apply_info_win").window('setTitle','申请信息');
		$("#staff_info_win").window('close');
	}
</script>
</head>
<body class = "easyui-layout">
	<div region = "center" title = "综合业务->申请管理" closable="false">
		<div border = "false" >
			<table id = "staff_cultivate_table" ></table>
		</div>
	</div>
	<div id = "staff_info_win" class = "easyui-window" buttonAlign = "center"  closed="true"style="width:800px;height:200px;padding:5px;">
		<div>
			<form action="">
				<div align="center"><b><span style="font-size: 12pt">待录入申请表的员工基本信息</span></b></div><br>
				<div>
					<div  class="fitem">
						<label>员工姓名:&nbsp;&nbsp;</label>
						<input name = "" readOnly = "true" class="easyui-validatebox" required="true">
						<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;所属部门:&nbsp;&nbsp;</label>
						<input name = "" readOnly = "true"  class="easyui-validatebox" required="true">
					</div>
				</div>
			</form>
			<div id="apply_add_button" region = "south" style="text-align:center;margin-top:50px;padding:5px 0;">
				<a id = "staff_apply_info_add" onclick = "applyAdd()" class="easyui-linkbutton" iconCls="icon-ok" >开始录入</a>
			</div>
			<div id = "apply_info_win" class = "easyui-window"  maximized = "true"  closed="true"style="width:800px;height:400px;padding:5px;">
				<div id = "apply_info_grid" class = "easyui-tabs" >
					<div title = "员工晋升详情">
						<table id = "promote_info_table"></table>
					</div>
					<div title = "员工转正详情">
						<table id = "positive_info_table"></table>
					</div>
					<div title = "员工离职详情">
						<table id = "resign_info_table"></table>
					</div>
				</div>
			</div>
			<div id = "promote_info_win"  class = "easyui-window" href=promote_info_add.jsp closed="true"style="width:800px;height:400px;padding:5px;">
			</div>
			<div id = "positive_info_win"  class = "easyui-window" href=positive_info_add.jsp closed="true"style="width:800px;height:400px;padding:5px;">
			</div>
			<div id = "resign_info_win"  class = "easyui-window" href=resign_info_add.jsp closed="true"style="width:800px;height:400px;padding:5px;">
			</div>
		</div>
	</div>
</body>
</html>